/**
 * 
 */
package com.bstek.code.model;

import java.io.Serializable;
import java.util.List;

/**
 * @description 主从表信息
 * @author zhangkun
 * @date 2020年5月25日
 *
 */
public class MasterSlaveInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private TableInfo masterTab;// 主表信息
	
	private TableInfo slaveTab;// 从表信息
	
	private ColumnInfo masterKey; //主表主键
	
	private ColumnInfo slaveKey; //从表外键

	private String packageName;// 包名

	private String masterDomainName;// packageName.javaBean
	
	private String slaveDomainName;// packageName.javaBean

	private String masterJavaBean;// 主表对应的javaBean
	
	private String slaveJavaBean;// 从表对应的javaBean

	private String controllerName;// bo类名

	private String daoName;// dao类名

	private String serviceName;// service 类名

	private String prBeanId;// beanid 前缀

	private String daoBeanId;// dao beanid

	private String controllerBeanId;// bo beanid

	private String serviceBeanId;// service beanid
	
	private List<ColumnInfo> masterCols;//主表显示的列
	
	private List<ColumnInfo> slaveCols;//从表显示的列
	
	public MasterSlaveInfo(){
		
	}
	
	public MasterSlaveInfo(String masterJavaBean , String slaveJavaBean , String packageName) {
		this.masterJavaBean = masterJavaBean;
		this.slaveJavaBean = slaveJavaBean;
		this.packageName = packageName;
		this.daoName = masterJavaBean + "Dao";
		this.controllerName = masterJavaBean + "Controller";
		this.serviceName = masterJavaBean + "Service";
		this.masterDomainName = packageName + ".entity." + masterJavaBean;
		this.slaveDomainName = packageName + ".entity." + slaveJavaBean ;
	}

	/**
	 * @return the masterTab
	 */
	public TableInfo getMasterTab() {
		return masterTab;
	}

	/**
	 * @param masterTab the masterTab to set
	 */
	public void setMasterTab(TableInfo masterTab) {
		this.masterTab = masterTab;
	}

	/**
	 * @return the slaveTab
	 */
	public TableInfo getSlaveTab() {
		return slaveTab;
	}

	/**
	 * @param slaveTab the slaveTab to set
	 */
	public void setSlaveTab(TableInfo slaveTab) {
		this.slaveTab = slaveTab;
	}

	/**
	 * @return the packageName
	 */
	public String getPackageName() {
		return packageName;
	}

	/**
	 * @param packageName the packageName to set
	 */
	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	
	/**
	 * @return the masterDomainName
	 */
	public String getMasterDomainName() {
		return masterDomainName;
	}

	/**
	 * @param masterDomainName the masterDomainName to set
	 */
	public void setMasterDomainName(String masterDomainName) {
		this.masterDomainName = masterDomainName;
	}

	/**
	 * @return the slaveDomainName
	 */
	public String getSlaveDomainName() {
		return slaveDomainName;
	}

	/**
	 * @param slaveDomainName the slaveDomainName to set
	 */
	public void setSlaveDomainName(String slaveDomainName) {
		this.slaveDomainName = slaveDomainName;
	}

	/**
	 * @return the masterJavaBean
	 */
	public String getMasterJavaBean() {
		return masterJavaBean;
	}

	/**
	 * @param masterJavaBean the masterJavaBean to set
	 */
	public void setMasterJavaBean(String masterJavaBean) {
		this.masterJavaBean = masterJavaBean;
	}

	/**
	 * @return the slaveJavaBean
	 */
	public String getSlaveJavaBean() {
		return slaveJavaBean;
	}

	/**
	 * @param slaveJavaBean the slaveJavaBean to set
	 */
	public void setSlaveJavaBean(String slaveJavaBean) {
		this.slaveJavaBean = slaveJavaBean;
	}

	/**
	 * @return the controllerName
	 */
	public String getControllerName() {
		return controllerName;
	}

	/**
	 * @param controllerName the controllerName to set
	 */
	public void setControllerName(String controllerName) {
		this.controllerName = controllerName;
	}

	/**
	 * @return the daoName
	 */
	public String getDaoName() {
		return daoName;
	}

	/**
	 * @param daoName the daoName to set
	 */
	public void setDaoName(String daoName) {
		this.daoName = daoName;
	}

	/**
	 * @return the serviceName
	 */
	public String getServiceName() {
		return serviceName;
	}

	/**
	 * @param serviceName the serviceName to set
	 */
	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	/**
	 * @return the prBeanId
	 */
	public String getPrBeanId() {
		return prBeanId;
	}

	/**
	 * @param prBeanId the prBeanId to set
	 */
	public void setPrBeanId(String prBeanId) {
		this.prBeanId = prBeanId;
	}

	/**
	 * @return the daoBeanId
	 */
	public String getDaoBeanId() {
		return daoBeanId;
	}

	/**
	 * @param daoBeanId the daoBeanId to set
	 */
	public void setDaoBeanId(String daoBeanId) {
		this.daoBeanId = daoBeanId;
	}

	/**
	 * @return the controllerBeanId
	 */
	public String getControllerBeanId() {
		return controllerBeanId;
	}

	/**
	 * @param controllerBeanId the controllerBeanId to set
	 */
	public void setControllerBeanId(String controllerBeanId) {
		this.controllerBeanId = controllerBeanId;
	}

	/**
	 * @return the serviceBeanId
	 */
	public String getServiceBeanId() {
		return serviceBeanId;
	}

	/**
	 * @param serviceBeanId the serviceBeanId to set
	 */
	public void setServiceBeanId(String serviceBeanId) {
		this.serviceBeanId = serviceBeanId;
	}

	/**
	 * @return the masterKey
	 */
	public ColumnInfo getMasterKey() {
		return masterKey;
	}

	/**
	 * @param masterKey the masterKey to set
	 */
	public void setMasterKey(ColumnInfo masterKey) {
		this.masterKey = masterKey;
	}

	/**
	 * @return the slaveKey
	 */
	public ColumnInfo getSlaveKey() {
		return slaveKey;
	}

	/**
	 * @param slaveKey the slaveKey to set
	 */
	public void setSlaveKey(ColumnInfo slaveKey) {
		this.slaveKey = slaveKey;
	}

	/**
	 * @return the masterCols
	 */
	public List<ColumnInfo> getMasterCols() {
		return masterCols;
	}

	/**
	 * @param masterCols the masterCols to set
	 */
	public void setMasterCols(List<ColumnInfo> masterCols) {
		this.masterCols = masterCols;
	}

	/**
	 * @return the slaveCols
	 */
	public List<ColumnInfo> getSlaveCols() {
		return slaveCols;
	}

	/**
	 * @param slaveCols the slaveCols to set
	 */
	public void setSlaveCols(List<ColumnInfo> slaveCols) {
		this.slaveCols = slaveCols;
	}
	
	
	
	
	
}
